#include <iostream>
#include <vector>
using namespace std;

int main()
{
  int i=0;
  int flag=0;
  vector <int> chisla;
  do
  {
    cin >> i;
	chisla.push_back(i);
  } while (i!=0);
  vector <int> a1;
  vector <int> a2;
  
  i=0;
  a1[0]=-1;
  a2[0]=-1;
  while (chisla[i]!=0)
  {
    for (int k=0; k<=a1.size(); k++)
        {
          flag=0;
          if (chisla[i]==a1[k])
            {
                  a2[k]++;
                  flag=1;
             }
        if (flag==0)
           a1.push_back(chisla[i]);
        i++;
         }
  }
  /*for (int k=0; k<a1.size(); k++)
    cout << a1[k] << " - " << a2[k];*/
  cin >> ws;
  return 0;
}

